<template>
    <div>
        <el-tree :data="treeData" :props="defaultProps"></el-tree>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                treeData: JSON.parse('[{"children":[{"label":"子节点1"},{"label":"子节点2"}],"label":"节点1"},{"label":"节点2"}]'),
                defaultProps: {
                    children: 'children',
                    label: 'label'
                }
            };
        }
    };
</script>

<style scoped>
    /* 可添加自定义样式 */
</style>